<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />

	<!--<title>example-project</title>-->
	<!-- css -->
	<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
	<link rel="stylesheet" th:href="@{/css/plugins/bootstraptable/bootstrap-table.css}" />
	<link rel="stylesheet" th:href="@{/css/plugins/3dmenu/jquery-accordion-menu.css}" />
	<link rel="stylesheet" th:href="@{/css/main.css}" />
</head>

<style type="text/css">
	.navbar-inverse {
		background-color:white;
		border-bottom:1px solid #DFDFDF;
	}
	.user {
		color:white;
		margin-top:15px;
	}
	.logout-btn {
		font-size:16px;
		margin-top:7px;
		margin-right:20px;
		cursor:pointer;
	}
	.localtitle {
		font-size:16px;
		margin-top:12px;
		color:white;
	}
</style>

<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
	<!-- 公共消息区域 -->
	<div id="messagetip" class="col-md-6 col-md-offset-3"
		 style="position: absolute; margin-top: 5px;"></div>
	<!-- 公共消息区域 -->

	<!--<div class="container-fluid" style=" background-color: #339DD9;">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<div>
				<a class="navbar-brand" href="#"
				   th:style="'width:50px; background-position:center; background-repeat: no-repeat; background-image:url('+@{/images/logo.png}+')'"></a>
				<label class="localtitle">应用名称</label>
			</div>
		</div>
		<div id="navbar" class="navbar-collapse collapse">
			<ul class="nav navbar-nav navbar-right">
				<li>
					<label th:text="${user.truename}" class="user"></label>
				</li>
				<li>
					<form class="navbar-form logout-form"
						  th:action="${oauthServerAddress}+'/logout'" method="post">
						<input type="hidden" name="access_token"
							   th:value="${access_token}"></input>
						<span title="注销" data-toggle="tooltip" data-placement="left" class="glyphicon glyphicon-off logout-btn" onclick="doLogout();" style="color:white;"></span>
					</form>
				</li>
			</ul>
		</div>
	</div>-->
</nav>

<div class="container-fluid">
	<div class="row">
		<div class="col-sm-3 col-md-2 sidebar"
			 style="padding-left: 0px; padding-right: 0px;">
			<div id="jquery-accordion-menu" class="jquery-accordion-menu gray">
				<form name="jumpForm" th:action="@{/jump}" method="post">
					<!--<input type="hidden" name="access_token" th:value="${access_token}"></input>-->
					<!--<input type="hidden" name="menuInfo"></input>-->
				</form>
				<ul>
					<li>
						<a href="#" th:onclick="|changeMenu('菜单1')|">菜单1</a>
					</li>
					<li>
						<a href="#" th:onclick="|changeMenu('菜单2')|">菜单2</a>
					</li>
					<li>
						<a href="#" th:onclick="|changeMenu('菜单3')|">菜单3</a>
					</li>
				</ul>
			</div>
		</div>
		<div layout:fragment="content"
			 class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
			<input type="text" name="userName"
				   th:value="${user.loginName}"></input></div>
	</div>
</div>
<div style="width:220px;position:fixed;bottom:10px;left:47%;">
	<form name="form_lic" th:action="@{/lic}" method="post">
		<!--<input type="hidden" name="access_token"
			   th:value="${access_token}"></input>-->
	</form>
	<a href="javascript:document.form_lic.submit();"><span th:text="${T(java.lang.System).getProperty('licenseinfo')}" /></a>
</div>
<script th:src="@{/js/plugins/jquery/jquery.min.js}"></script>
<script th:src="@{/js/plugins/3dmenu/jquery-accordion-menu.js}"></script>
<script th:src="@{/js/plugins/fileupload/jquery.ui.widget.js}"></script>
<script th:src="@{/js/plugins/fileupload/jquery.fileupload.js}"></script>
<script th:src="@{/js/plugins/bootstrap/bootstrap.js}"></script>
<script th:src="@{/js/plugins/bootstraptable/bootstrap-table.js}"></script>

<!--[if lt IE 9]>
<script th:src="@{/js/plugins/bootstrap/html5shiv.min.js}"></script>
<script th:src="@{/js/plugins/bootstrap/respond.min.js}"></script>
<![endif]-->
<script type="text/javascript" th:inline="javascript">/*<![CDATA[*/

var access_token = /*[[${access_token}]]*/;

function doLogout() {
    $("form.logout-form").submit();
}

function changeMenu(menuInfo){
    $('input[name="menuInfo"]').val(menuInfo);
    document.jumpForm.submit();
}

/*]]>*/</script>
</body>
</html>